package com.jeesite.modules.task.receive.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.BaseEntity;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import lombok.Data;

import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 任务接收Dto
 * @author zrr
 * @version 2022-03-02
 */
@Table(name="dc_sup_task_action", alias="a", label="任务部署信息表(主)信息", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="task_id", attrName="taskId.id", label="任务id"),
		@Column(name="transfer_flag", attrName="transferFlag", label="是否转发（0否，1是）"),
		@Column(name="transfer_org_code", attrName="transferOrgCode", label="转发单位编号"),
		@Column(name="transfer_org_name", attrName="transferOrgName", label="转发单位名称", queryType=QueryType.LIKE),
		@Column(name="explain_flag", attrName="explainFlag", label="是否批示（0否，1是）"),
		@Column(name="explain_content", attrName="explainContent", label="领导批示"),
		@Column(name="task_status", attrName="taskStatus", label="任务状态", comment="任务状态（0删除、1待接收、2接收、3进行中、4已结束）"),
		@Column(name="task_progress", attrName="taskProgress", label="任务完成进度", comment="任务完成进度（1进度滞后、2逾期反馈、3序时推进、4已完成）"),
		@Column(name="task_receive_time", attrName="taskReceiveTime", label="反馈时间"),
		@Column(name="update_by", attrName="updateBy", label="更新人"),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isUpdateForce=true),
		@Column(name="remarks", attrName="remarks", label="查询状态"),
}
)
@Data
public class TaskReceiveDto extends DataEntity<TaskReceiveDto> {


	@ExcelFields({
			@ExcelField(title="任务标题", attrName="taskTitle", align= ExcelField.Align.LEFT, sort=10),
			@ExcelField(title="任务内容", attrName="taskContent", align= ExcelField.Align.LEFT, sort=20),
			@ExcelField(title="牵头责任单位", attrName="leaderOrgName", align = ExcelField.Align.CENTER, sort=30),
			@ExcelField(title="联系人", attrName="contactName", align= ExcelField.Align.CENTER, sort=40),
			@ExcelField(title="接收时间", attrName="receiveTime", align= ExcelField.Align.CENTER, sort=50),
			@ExcelField(title="状态", attrName="taskStatus", align= ExcelField.Align.CENTER, sort=60, dictType="dc_receive_status"),
	})
	
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	private String id;
	/**
	 * 主表主键
	 */
	private String taskId;
	private String actionId;
	/**
	 * 任务标题
	 */
	private String taskTitle;
	private String taskYear;
	private long isFeedback;
	private String taskTypeCode;
	private String taskTypeName;
	private String taskLeaderName;
	private String normalFlag;

	/**
	 * 任务内容
	 */
	private String taskContent;
	private String feedbackAdvice;
	private String feedbackProgress;
	private Long feedbackRate;
	private String feedbackName;
	private String createUnit;

	/**
	 * 牵头责任单位
	 */
	private String leaderOrgCode;
	private String leaderOrgName;
	/**
	 * 联系人
	 */
	private String contactName;
	/**
	 * 接收时间
	 */
	private String receiveTime;
	private Date taskReceiveTime;
	/**
	 * 状态
	 */
	private String taskStatus;
	private String explainFlag;

	private String taskProgress;
	private String transferFlag;
	private String transferOrgName;
	private Integer num;

	//下面是查询条件----------------------------------------------------------------------------------------

	/**
	 * 开始时间
	 */
	private String taskStartTime;
	/**
	 * 结束时间
	 */
	private String taskEndTime;
	//控制不查看草稿
	private String remarks2;
	private String remarks;

	private String messageNumber;
	private String feedbackEndTimeStr;
	private Date feedbackTime;
	private Date feedbackStartTime;
	private Date feedbackEndTime;
	private Integer isWatch;//为1修改草稿为未提交

	private String colour;//显示已接收的最新待反馈时间颜色
	private String decomposeTaskId;//分解任务主id
}